package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Role;
import cn.wolfcode.crm.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

//    int getCount();

    List<Role> query(QueryObject qo);

    void insertRelation(@Param("roleId") Long id, @Param("permissionId") Long permissionId);

    void deleteRelation(@Param("roleId") Long id);

    /**
     * 根据员工id查询 角色Sn编码的集合
     * @param id
     * @return
     */
    List<String> selectSnByEmployeeId(Long id);
}